import java.util.Iterator;
import java.util.ArrayList;

public class YW_Flock implements YW_Quackable {
	ArrayList quackers = new ArrayList();
  
	public void add(YW_Quackable quacker) {
		quackers.add(quacker);
	}
  
	public void quack() {
		Iterator iterator = quackers.iterator();
		while (iterator.hasNext()) {
			YW_Quackable quacker = (YW_Quackable)iterator.next();
			quacker.quack();
		}
	}   	
  
	public String toString() {
		return "Flock of Quackers";
	}
}
